﻿@using KonsolAntresol.Helpers
@model IEnumerable<KonsolAntresol.Models.MenuItemModel>
<ul class="headSubMenuContainer">
	@{
		foreach (var menuItem in Model)
		{
			<li class="subMenuItem">
				@Html.MenuLink(menuItem.Text, menuItem.Action, menuItem.Controller, menuItem.PageName)
				@if (menuItem.SubMenu.Any())
				{
					@Html.Partial("HeadSubMenu", menuItem.SubMenu)
				}
			</li>
			if (Model.Last() != menuItem)
			{
				<hr />
			}
		}
	}
</ul>
